package java3_20;

public abstract class Car {

    // private String MotoVehicle ;//汽车类型
    private String carNumber;
    private double money;
    private boolean flag;
    private int seatCount;//座位数
    private String type;//汽车型号
    public Car(){

    }
    public Car(String carNumber, double money,boolean flag,int seatCount,String type) {

        this.carNumber = carNumber;
        this.money = money;
        this.flag = flag;
        this.seatCount = seatCount;
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getSeatCount() {
        return seatCount;
    }

    public void setSeatCount(int seatCount) {
        this.seatCount = seatCount;
    }

//    public String getMotoVehicle() {
//        return MotoVehicle;
//    }
//
//    public void setMotoVehicle(String motoVehicle) {
//        this.MotoVehicle = motoVehicle;
//    }

    public void setMoney(double money) {
        this.money = money;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    public double getMoney() {
        return money;
    }
    //计算租金方法
    public double calRent(int  days){
        return this.getMoney()*days;
    }

    //租赁流程，显示汽车信息拱客户选择
    abstract void leaseOutFlow(String a);

    /*public void show(){
        System.out.println(   this.getType() + "," + this.getCarNumber() + "," + this.getSeatCount()
                + "," + this.getMoney() + "," + this.isFlag());
    }*/

    abstract void show();

    abstract void showRentResult();

//    public Car[] add(Car[] car){
//        for (int i = 0; i < car.length; i++) {
//            if (car[i] == null) {
//                car[i] = this;
//                break;
//            }
//        }
//        return car;
//
//    }

}
